In algebra, the cofree coalgebra of a vector space or module is a coalgebra analog of the free algebra of a vector space. The cofree coalgebra of any vector space over a field exists, though it is more complicated than one might expect by analogy with the free algebra.
If V is a vector space over a field k, then the cofree coalgebra C(V) of V is a coalgebra together with a linear map C(V)→V, such that any linear map from a coalgebra X to V factors through a coalgebra homomorphism from X to C(V). In other words the functor C is right adjoint to the forgetful functor from coalgebras to vector spaces.
The cofree coalgebra of a vector space always exists, and is unique up to canonical isomorphism.
Cofree cocommutative coalgebras are defined in a similar way, and can be constructed as the largest cocommutative coalgebra in the cofree coalgebra.